package cn.gcxy.service.impl;

import java.util.ArrayList;
import java.util.List;

import cn.gcxy.model.vo.Petowner;
import cn.gcxy.model.vo.Petstore;
import cn.gcxy.dao.impl.AccountDAO;
import cn.gcxy.dao.impl.PetDAO;
import cn.gcxy.dao.impl.PetstoreDAO;
import cn.gcxy.model.vo.Account;
import cn.gcxy.model.vo.Pet;
import cn.gcxy.service.IPetstoreService;

public class PetstoreServiceimpl implements IPetstoreService {

	@Override
	public void buy(Petowner p) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void sell(Petowner p) {
		// TODO Auto-generated method stub
		
	}
	public void breed(String name,String typename,int price,int s) 
	{
		PetstoreDAO.breedpet(name, typename, price, s);
	}


	@Override
	public ArrayList<Pet> getPetsInStock(Petstore pst) {
		
		ArrayList<Pet> allstopet=PetDAO.storepet(pst);
		return allstopet;
		
	}
	public void charge(Petowner pet) {
		PetDAO.selectmoney(pet.getID());
	}
	

	@Override
	public ArrayList<Account> getAccount(Petstore pst) {
		ArrayList<Account> ar;
		ar=AccountDAO.displaystoaccount(pst);
		return ar;
	}

}
